import 'package:flutter/material.dart';

import '../../../helper/utils/util.dart';

class MeCell extends StatelessWidget {
  const MeCell({
    Key? key,
    this.icon,
    this.color,
    this.bgColor,
    required this.title,
    this.content,
    this.onTap,
  }) : super(key: key);
  final IconData? icon;
  final Color? color;
  final String title;
  final String? content;
  final VoidCallback? onTap;
  final Color? bgColor;
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Container(
        margin: EdgeInsets.fromLTRB(20.r, 0, 20.r, 10.r),
        padding: EdgeInsets.symmetric(horizontal: 12.r),
        height: 50.r,
        decoration: BoxDecoration(
            color: bgColor ?? const Color(0xffF8F8F8),
            borderRadius: BorderRadius.circular(5.r)),
        child: Row(
          children: [
            if (icon != null)
              Row(
                children: [
                  Icon(
                    icon,
                    size: 30.r,
                    color: color,
                  ),
                  SizedBox(
                    width: 10.r,
                  ),
                ],
              ),
            Expanded(
                child: Text(
              title,
              style: const TextStyle(
                  color: ColorsUtil.title,
                  fontSize: 15,
                  fontWeight: FontWeight.w400),
            )),
            Text(
              content ?? '',
              style: TextStyle(color: ColorsUtil.content, fontSize: 12.sp),
            ),
            Icon(
              Icons.play_arrow_rounded,
              size: 20.r,
              color: Colors.blue,
            )
          ],
        ),
      ),
    );
  }
}
